/*
 * Copyright (c) 2016, FPX and/or its affiliates. All rights reserved.
 * Use, Copy is subject to authorized license.
 */
package com.fpx.xms.api.dto.crm;

import com.fpx.open.platform.common.constant.SysConstant;
import com.fpx.xms.api.dto.AbstractResponse;

/**
 * CRM响应模型
 * @author shiw
 * @date 2016年8月5日
 */
public class CrmResponse extends AbstractResponse {

	/** 是否成功 */
	private boolean success;
	
	private boolean retry;
	
	/** 错误消息描述 */
	private String errMsg;
	
	/** 返回的相应需要的数据 */
	private CrmBusinessData data;

	/**
	 * @return the errMsg
	 */
	public String getErrMsg() {
		return errMsg;
	}

	/**
	 * @param errMsg the errMsg to set
	 */
	public void setErrMsg(String errMsg) {
		this.errMsg = errMsg;
	}

	/**
	 * @return the data
	 */
	public CrmBusinessData getData() {
		return data;
	}

	/**
	 * @param data the data to set
	 */
	public void setData(CrmBusinessData data) {
		this.data = data;
	}
	
	@Override
	public String getIsSuccess() {
		String isSuccess = SysConstant.NO;
		if(this.success){
			isSuccess = SysConstant.YES;
		}
		return isSuccess;
	}

	@Override
	public boolean isSuccess() {
		return success;
	}

	/**
	 * @return the retry
	 */
	public boolean isRetry() {
		return retry;
	}

	/**
	 * @param retry the retry to set
	 */
	public void setRetry(boolean retry) {
		this.retry = retry;
	}

}